import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const index = () => import('../views/index.vue')
const register = () => import('../views/register.vue')
const login = () => import('../views/login.vue')
const shopping = () => import('../views/shopping.vue')
const details = () => import('../views/details.vue')
const list = () => import('../views/list.vue')
const me = () => import('../views/me.vue')
const order = () => import('../views/order.vue')


const routes = [
  {
    path: '/',
    name: 'index',
    component: index
  },
  {
    path: '/register',
    name: 'register',
    component: register
  },
  {
    path: '/login',
    name: 'login',
    component: login
  },
  {
    path: '/shopping',
    name: 'shopping',
    component: shopping
  },
  {
    path: '/details',
    name: 'details',
    component: details
  },
  {
    path: '/list',
    name: 'list',
    component: list
  },
  {
    path: '/me',
    name: 'me',
    component: me
  },
  {
    path: '/order',
    name: 'order',
    component: order
  },
]

const router = new VueRouter({
  routes
})

export default router
